package com.jzo2o.market.controller;

import com.jzo2o.market.model.dto.response.CouponInfoResDTO;
import com.jzo2o.market.service.ICouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/consumer/coupon")
public class CouponAppController {

    @Autowired
    private ICouponService couponService;

    @GetMapping("/my")
    public List<CouponInfoResDTO> myCoupon(Integer status, Long lastId) {
        List<CouponInfoResDTO> list = couponService.myCoupon(status, lastId);
        return list;

    }
}
